package com.baikeyang.common.bean;

/**
 * Created by lenovo on 2019/5/7.
 */
public class PageResult {



    /**
     * 返回单字符串信息
     */
    private String result = "";

    /**
     * 返回信息说明
     */
    private String message = "";

    /**
     * 数据
     */
    private Object data = null;

    /**
     * 数据分页对象
     */
    private Pager pager;

    public PageResult() {
        this.pager = new Pager();
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Pager getPager() {
        return pager;
    }

    public void setPager (Pager pager) {
        this.pager = pager;
    }

    public void setPager (int page) {
        this.getPager().setPage(page);
    }

    public void setPager (int page, long recTotal){
        this.pager.setPage(page);
        this.pager.setRecTotal(recTotal);
    }

    public void setPager (int page, int recTotal, int recPerPage) {
        this.pager.setPage(page);
        this.pager.setRecTotal(recTotal);
        this.pager.setRecPerPage(recPerPage);
    }

}
